package com.core.cloudbusiness.system.depart.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.core.cloundbusinessapi.system.depart.dto.CloudSystemDepartDTO;
import com.core.cloundbusinessapi.system.depart.vo.CloudSystemDepartVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author =====Lqj=====
 * @className CloudSystemDepartMapper
 * @description
 * @create 2024/11/29 14:18
 **/
@Repository
public interface CloudSystemDepartMapper extends BaseMapper<CloudSystemDepartDTO> {

    /**
     * 根据条件查询部门
     * @param cloudSystemDepartVO
     * @return
     */
    CloudSystemDepartDTO queryMapper(@Param("cloudSystemDepartVO") CloudSystemDepartVO cloudSystemDepartVO);


    /**
     * 查询部门最大的排序号
     * @return
     */
    @Select("select max(depart_order)\n" +
            "from sys_depart")
    Integer queryDepartOrderMapper();

    /**
     * 查询全部部门
     * @return
     */
    List<CloudSystemDepartDTO> queryDepartAllMapper();
}
